package cn.gson.fengboot.model.service;

import cn.gson.fengboot.model.dao.LkhqrDao;
import cn.gson.fengboot.model.mapper.LkhqrMapper;
import cn.gson.fengboot.model.pojos.Lkhqr;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class LkhqrService {
    @Autowired
    LkhqrDao lkhqrDao;
    @Autowired
    LkhqrMapper lkhqrMapper;

    //新增
    @Transactional(transactionManager = "transactionManager")
    public  void addkhqr(Lkhqr lkhqr){
        lkhqrDao.save(lkhqr);
    }

    //查询
    public List<Lkhqr> khqrcx(Integer qrbid){
        return lkhqrMapper.khqrcx(qrbid);
    }
}
